Skip to content

Replace old read-only checker with new one. #4069

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 17, 2025

Conversation

sakupan102
Copy link
Contributor

gcc/rust/ChangeLog:

	* checks/errors/rust-readonly-check2.cc (ReadonlyChecker::check_variable):
	Read-only check if the variable is mutable type.
	(ReadonlyChecker::is_mutable_type): Read-only check if the variable is mutable type.
	* checks/errors/rust-readonly-check2.h: Read-only check if the variable is mutable type.

Signed-off-by: Ryutaro Okada <[email protected]>
gcc/rust/ChangeLog:

	* Make-lang.in: Replace old read-only checker with new implementation.
	* checks/errors/rust-readonly-check.cc (ReadonlyChecker::ReadonlyChecker):
	Replace old read-only checker with new implementation.
	* checks/errors/rust-readonly-check.h:
	Replace old read-only checker with new implementation.
	* rust-session-manager.cc (Session::compile_crate):
	Switch to new read-only checker.
	* checks/errors/rust-readonly-check2.cc: Removed.
	* checks/errors/rust-readonly-check2.h: Removed.

Signed-off-by: Ryutaro Okada <[email protected]>
Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@philberty philberty added this pull request to the merge queue Aug 17, 2025
@philberty philberty added the diagnostic diagnostic static analysis label Aug 17, 2025
Merged via the queue into Rust-GCC:master with commit 386a185 Aug 17, 2025
13 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in libcore 1.49 Aug 17, 2025
@@ -1,4 +1,4 @@
// Copyright (C) 2021-2025 Free Software Foundation, Inc.
// Copyright (C) 2025 Free Software Foundation, Inc.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CohenArthur we'll probably want to fix up this copyright header before upstreaming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostic diagnostic static analysis
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants